#include <iostream>
#include <vector>
class Solution {
    public:
        vector<int> twoSum(vector<int>& nums, int target) {

            vector<int> ret;
            int len = nums.size();
            int remain = 0;
            for (int i=0; i<len; i++) {
                remain = target - nums[i];
                for (int j=i+1; j<len; j++) {
                    if (nums[j] == remain) {
                        ret.push_back(i);
                        ret.push_back(j);
                        return ret;
                    }
                }
            }
            return ret;
        }

};
